package com.lingxu.base.system.dict.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lingxu.base.system.dict.entity.SysDict;
import com.lingxu.base.system.dict.entity.SysDictItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysDictItemMapper extends BaseMapper<SysDictItem> {
    Integer findOneByName(@Param("dictcode") String dictcode,@Param("name") String name);

    Integer findOneByValue(@Param("dictcode") String dictcode,@Param("value") String value);

    SysDictItem findOnlyOne(SysDictItem sysDictItem);

    List<SysDictItem> findSysDictItemListByDictId(@Param("dictid")String dictid);

    SysDict findDictById(@Param("id")String id);

    SysDictItem findDictInfoDetailsById(@Param("id")String id);

    void deleteByDictId(@Param("dictid") String dictid);
}
